//
//  PropertyEditors.h
//  Editor
//
//  Created by Jeppe Nielsen on 11/14/14.
//  Copyright (c) 2014 Jeppe Nielsen. All rights reserved.
//

#pragma once

#include <QtWidgets/QtWidgets>
#include "SerializedProperty.hpp"
#include <string>

class PropertyEditorFloat : public SerializedPropertyEditor<SerializedProperty<float>, QWidget, QVariant> {

    QWidget* CreateEditor(SerializedProperty<float>& property, QWidget* parent);
    
    void EditingStarted(SerializedProperty<float>& property, QWidget* editor);
    
    void EditingFinished(SerializedProperty<float>& property, QWidget* editor);
    
    void GetValue(SerializedProperty<float>& property, QVariant* value);
    
};

class PropertyEditorInt : public SerializedPropertyEditor<SerializedProperty<int32_t>, QWidget, QVariant> {

    QWidget* CreateEditor(SerializedProperty<int32_t>& property, QWidget* parent);
    
    void EditingStarted(SerializedProperty<int32_t>& property, QWidget* editor);
    
    void EditingFinished(SerializedProperty<int32_t>& property, QWidget* editor);
    
    void GetValue(SerializedProperty<int32_t>& property, QVariant* value);
    
};

class PropertyEditorString : public SerializedPropertyEditor<SerializedProperty<std::string>, QWidget, QVariant> {

    QWidget* CreateEditor(SerializedProperty<std::string>& property, QWidget* parent);
    
    void EditingStarted(SerializedProperty<std::string>& property, QWidget* editor);
    
    void EditingFinished(SerializedProperty<std::string>& property, QWidget* editor);
    
    void GetValue(SerializedProperty<std::string>& property, QVariant* value);
    
};